package com.mobilesales.c2dm;

import service.ServiceClient;

import com.mobilesales.android.model.clients.Client;
import com.mobilesales.android.services.ClientServiceClient;
import com.mobilesales.android.services.Configuration;
import com.mobilesales.c2dm.C2DMMessaging;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;

public class AndroidC2DMActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        //try{
        C2DMMessaging.register(this, "mobilesales88@gmail.com");
        //Thread.sleep(4000);
        String id = C2DMMessaging.getRegistrationId(this);
        Log.i("ID", id);
        /*
        Configuration conf = new Configuration("http://10.0.2.2:19048/RestServices/ClientServiceREST.svc", "6e47537b-e105-4ee8-b847-ee45a63da473");
        //ServiceClient client = new ServiceClient(conf);
        ClientServiceClient client  = new ClientServiceClient(conf);
        Client cl = client.getClient(2);
        Log.i("clientid", String.valueOf(cl.Id));
        } catch (Exception e){
        	Log.e("exc", e.getMessage());
        }
        */
    }
}